﻿#ifndef __SS_XML_DB_THREAD_H__
#define __SS_XML_DB_THREAD_H__
#include "../ssDBThread.h"
#include "./mysqlCfg.h"

namespace StarSeeker
{

class ssXmlDBThread : public ssDBThreadBase
{
public:
	ssXmlDBThread();
	~ssXmlDBThread();
	//读取配置文件
	bool ReadAllCfg(const char* path);
	//准备查询语句
	bool InitQuery();
	//增加一条查询
	void AddQuery(u32 id, const char* pIn, const char* pOut, const char* pSql, const i8 resultFlag);
	//获取配置
	mysqlCfgRow* GetCfg(u32 id);

protected:
	bool OnDBMsg(ssNetMsgHead* pHead, const char* pData, const u32 dataLen, u32 connectID);
protected:
	std::map<u32, mysqlCfgRow>	m_queryMap;
public:
	bool m_log;
};

}
#endif
